home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 003 / _gs / !GS / h / gdevarc < prev    next >
Text File  |  1991-11-23  |  3KB  |  73 lines

  1. /* Copyright (C) 1991 David Elworthy.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gdevarc.h */
  21. /* Ghostscript driver for Acorn Archimedes (RISC OS) */
  22.  
  23. /*--- Miscellaneous parameters and globals ---*/
  24.  
  25. #define MAX_OPTIONS 80
  26. #define Max_Zoom (524288)
  27.  
  28. /* Sprite name - normally we use pointer reference */
  29. #define sprite_name "gsoutput"
  30.  
  31. #define file_type 0xff9   /* Sprite */
  32.  
  33. #if (0)
  34. extern char *arc_client;
  35. #endif
  36.  
  37. /*--- Device structure ---*/
  38. /* The non-standard field in here are ones that are specifically associated
  39.    with the sprite output device. Things which are general to the user interface
  40.    are help elswehere.
  41. */
  42. typedef struct gx_device_arc_s gx_device_arc;
  43. struct gx_device_arc_s {
  44.     gx_device_common;   /* Standard part of device structure */
  45.     int mode;           /* Screen mode */
  46.     int xeig, yeig;     /* OS/pixel factors */
  47.     wimp_w page_window; /* Page window handle */
  48.     sprite_area *sarea; /* Address of sprite area */
  49.     int sarea_size;     /* Space allocated for it */
  50.     sprite_id sprite;   /* Sprite identifier block */
  51.     sprite_factors f;   /* Current sprite scaling */
  52.     BOOL is_256;        /* Is this a 256 colour mode? */
  53.     BOOL page_closed;   /* Is page open or closed? */
  54.     BOOL save_only;     /* Are we in save only mode? */
  55.     int  paltab[256];   /* Palette table */
  56. };
  57. #define arc_dev(dev) ((gx_device_arc *)dev)
  58. #define adev_needed(d)  gx_device_arc *adev = arc_dev(d)
  59. #define arc_is_col256(adev)  (adev->is_256)
  60.  
  61.  
  62. /* Low level code */
  63. void arc_set_options(gx_device_arc *adev, int mode, float width,
  64.                      float height, float xres, float yres);
  65. BOOL arc_create_op(gx_device_arc *dev);
  66. void arc_set_title(gx_device_arc *adev, char *title);
  67. void arc_page_event_handler(wimp_eventstr *e, void *handle);
  68. BOOL arc_device_options(void *handle, char* hit);
  69. void arc_set_window_extent(gx_device_arc *adev);
  70. BOOL arc_saver(char *filename, void *handle);
  71. void arc_process_page_menu(void *handle, char* hit);
  72. menu arc_create_page_menu(void *handle);
  73.